import { postAxios, getAxios } from '@/lib/http';
export const contactApi = {
  // 新增
  addContact: (data) => {
    return postAxios('/contact/add', data);
  },
  // 分页查询
  getContactList: (data) => {
    return postAxios('/contact/page/query', data);
  },
  // 获取所有
  getAll: () => {
    return getAxios('/contact/list');
  },
  // 删除
  deleteContact: (id) => {
    return getAxios('/contact/delete/' + id);
  },
  // 查看邮件详情
  getDetail: (id) => {
    return getAxios('/contact/detail/' + id);
  },
  // 更新编辑邮件
  updateContact: (data) => {
    return postAxios('/contact/update', data);
  },

  export: () => {
    return getAxios('/export');
  }
};
